package cn.com.cfae.iras.doc.analyze.components.integrity;

import cn.com.cfae.iras.doc.analyze.components.BaseComponent;
import cn.com.cfae.iras.doc.analyze.components.beans.ComponentResult;
import cn.com.cfae.iras.doc.analyze.handUtil.HandingData;
import cn.com.cfae.iras.doc.analyze.parse.model.ChapterModel;
import cn.com.cfae.iras.doc.analyze.parse.model.DocumentModel;
import cn.com.cfae.iras.doc.analyze.parse.model.ExtractItem;
import cn.com.cfae.iras.doc.analyze.parse.model.PageModel;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

@Component("I1022")
@Scope("prototype")
public class I1022 extends BaseComponent {
    private static Logger log = LoggerFactory.getLogger(I1022.class);
    @Autowired
    private HandingData handingData;

    @Override
    public List<ComponentResult> handlerM() {
        log.info("获取I1022组件M");

        List<ComponentResult> componentResults = checkRulesI1022("M-5","M-5","M-5-3","M-5-6",getRuleTitle(),"(M8)");
        return componentResults;
    }

    @Override
    public List<ComponentResult> handlerBM() {
        log.info("获取I1022组件BM");
        List<ComponentResult> componentResults = checkRulesI1022("BM-5","BM-5","BM-5-1","BM-5-4",getRuleTitle(),"(M8)");
        return componentResults;
    }

    @Override
    public List<ComponentResult> handlerDM() {
        log.info("获取I1022组件DM");
        List<ComponentResult> componentResults = checkRulesI1022("DM-5","DM-5","DM-5-3","DM-5-6",getRuleTitle(),"(D8)");
        return componentResults;
    }

    @Override
    public List<ComponentResult> handlerBDM() {
        log.info("获取I1022组件BDM");
        List<ComponentResult> componentResults = checkRulesI1022("BDM-5","BDM-5","BDM-5-1","BDM-5-4",getRuleTitle(),"(D8)");
        return componentResults;
    }

    private List<ComponentResult> checkRulesI1022(String model,String catalogId,String chapterId1,String chapterId2,String ruleName,String subTitle){
        DocumentModel extractData = super.getExtractData();
        List<ComponentResult> componentResults = new ArrayList<>();
        ComponentResult componentResult = null;
        ExtractItem extractItem = null;
        int pageNum = 0;
        List<ComponentResult.TextPosition> contentAndPositionList = null;
        boolean frFlag = false;
        String [] keywords = new String[]{"丧失行为能力","疾病","死亡","失踪","涉嫌","违规","违法","被执行","司法"};

        boolean tfFlag = false;
        boolean isExist = false;
        List<ComponentResult.TextPosition> tfContentAndPositionList = null;
        int tfPageNum = 0;
        int startPage = 0;
        boolean isYPL =false;
        boolean isWPL = false;
        boolean isYSPL = false;
        String[] djgs = new String[]{"董事会","监事会","高管"};
        String tfRegex = ".*突发事件应急管理.*";
        try {

            if (extractData!=null){
                ChapterModel chapterModel = extractData.getChapterModel(model);
                startPage =  chapterModel!=null?chapterModel.getStartPage():0;
                if (chapterModel!=null){


                    List<ComponentResult> resuls = getCompontentResultOfDjg(chapterModel, catalogId, chapterId1, ruleName, startPage,subTitle);
                    componentResults.addAll(resuls);


                    if (CollectionUtils.isNotEmpty(componentResults)){
                        for (ComponentResult result :componentResults){
                            if (result.getExist().equals("01")){
                                isExist = true;
                                break;
                            }
                        }
                    }

                    if (isExist){
                        List<PageModel> pageModelList = chapterModel.getPageModelList();
                        for (PageModel pageModel:pageModelList){
                            Map<String, Object> containsKeyWord = handingData.isContainsKeyWordOfRegex(pageModel.getJsonTextData(), tfRegex);
                            tfFlag = (boolean)containsKeyWord.get("flag");
                            if (tfFlag){
                                tfPageNum = pageModel.getPageNumber();
                                tfPageNum = tfPageNum!=0?tfPageNum:startPage;
                                tfContentAndPositionList = (List<ComponentResult.TextPosition>)containsKeyWord.get("position");
                                break;
                            }
                        }

                        if (tfFlag){
                            isYPL  = true;
                            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-突发事件应急管理","企业已制定突发事件应急管理制度",false,getRegulationId(),tfPageNum,tfContentAndPositionList,"01");
                            componentResults.add(componentResult);
                        }else {
                            isWPL = true;
                            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-突发事件应急管理","企业尚未制定突发事件应急管理制度",true,getRegulationId(),startPage,tfContentAndPositionList,"02");
                            componentResults.add(componentResult);
                        }

                    }else {
                        isYSPL = true;
                        componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-突发事件应急管理","未触发检查",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
                        componentResults.add(componentResult);
                    }
                }
            }
            /*if (isYPL){
                if (CollectionUtils.isNotEmpty(componentResults)){
                    for (ComponentResult result : componentResults){
                        result.setExist("01");
                    }
                }
            }
            if (isWPL){
                if (CollectionUtils.isNotEmpty(componentResults)){
                    for (ComponentResult result : componentResults){
                        result.setExist("02");
                    }
                }
            }
            if (isYSPL){
                if (CollectionUtils.isNotEmpty(componentResults)){
                    for (ComponentResult result : componentResults){
                        result.setExist("02");
                    }
                }
            }*/

        }catch (Exception e){
            componentResults.clear();

            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-丧失行为能力","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);
            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-疾病","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);
            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-死亡","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);
            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-失踪","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);
            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-涉嫌","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);
            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-违规","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);
            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-违法","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);
            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-被执行","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);
            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-司法","未识别,建议人工核对",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);

            componentResult =  handingData.getComponentResult(catalogId,chapterId2,ruleName,subTitle+"法人治理结构,关键词检查-突发事件应急管理","未触发检查",true,getRegulationId(),startPage,tfContentAndPositionList,"03");
            componentResults.add(componentResult);


            log.error(e.getMessage(),e);
        }

        return componentResults;
    }



    private List<ComponentResult> getCompontentResultOfDjg(ChapterModel chapterModel,String catalogId,String chapterId,String ruleName,int startPage,String subTitle){
        Double x = 0.0;
        Double y = 0.0;
        List<ComponentResult> componentResults = new ArrayList<>();
        ComponentResult componentResult = null;

        ComponentResult.TextPosition contentAndPosition =null;
        List<PageModel> pageModelList = chapterModel.getPageModelList();
        int pageNum = 0;

        boolean ssxwnlFlag = false;
        boolean jbFlag = false;
        boolean swFlag = false;
        boolean szFlag = false;
        boolean sxFlag = false;
        boolean wgFlag = false;
        boolean wfFlag = false;
        boolean bzxFlag = false;
        boolean sfFlag = false;
        String ssxwnlRegex = ".*丧失行为能力.*";
        String jbRegex = ".*疾病.*";
        String swRegex = ".*死亡.*";
        String szRegex = ".*失踪.*";
        String sxRegex = ".*涉嫌.*";
        String wgRegex = ".*违规.*";
        String wfRegex = ".*违法.*";
        String bzxRegex = ".*被执行.*";
        String sfRegex = ".*[^公]司法.*";

        boolean isBusinessExest = false;
        Pattern pattern = null;
        Matcher matcher = null;

        if (CollectionUtils.isNotEmpty(pageModelList)){


            for (PageModel pageModel : pageModelList) {
                JsonElement jsonTextData = pageModel.getJsonTextData();
                if (!jsonTextData.isJsonNull()){
                    JsonArray jsonArray = jsonTextData.getAsJsonArray();
                    if (!jsonArray.isJsonNull()){
                        for (int i=0;i<jsonArray.size();i++){
                            JsonObject asJsonObject = jsonArray.get(i).getAsJsonObject();
                            Set set = asJsonObject.entrySet();
                            Iterator<Map.Entry<String, JsonElement>> it = set.iterator();
                            String key ;

                            while (it.hasNext()){
                                //每一页data数据
                                Map.Entry<String, JsonElement> entry = it.next();
                                key= entry.getKey();
                                if (StringUtils.isNotEmpty(key)&&key.equals("data")){
                                    JsonArray dataJsonArray = null;
                                    if (entry.getValue().isJsonArray()){
                                        dataJsonArray  = entry.getValue().getAsJsonArray();
                                    }
                                    if (!dataJsonArray.isJsonNull()){

                                        for (int d=0; d<dataJsonArray.size(); d++){
                                            JsonArray delmJsonArray = dataJsonArray.get(d).getAsJsonArray();
                                            if (!dataJsonArray.isJsonNull()){
                                                for (int de=0;de<delmJsonArray.size();de++){
                                                    JsonObject deJsonObject = delmJsonArray.get(de).getAsJsonObject();
                                                    Set deSet = deJsonObject.entrySet();
                                                    Iterator<Map.Entry<String, JsonElement>> deIt = deSet.iterator();
                                                    while (deIt.hasNext()){
                                                        Map.Entry<String, JsonElement> deEntry = deIt.next();
                                                        String deKey= deEntry.getKey();
                                                        if (StringUtils.isNotEmpty(deKey)&&deKey.equals("top")){
                                                            y = deEntry.getValue()!=null?deEntry.getValue().getAsDouble():0.0;
                                                        }
                                                        if (StringUtils.isNotEmpty(deKey)&&deKey.equals("left")){
                                                            x = deEntry.getValue()!=null?deEntry.getValue().getAsDouble():0.0;
                                                        }

                                                        if (StringUtils.isNotEmpty(deKey)&&deKey.equals("text")){
                                                            String count = deEntry.getValue().getAsString();
                                                            /*if (!isBusinessExest){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(".*"+djg+".*");
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        isBusinessExest =true;
                                                                    }
                                                                }
                                                            }*/
                                                            isBusinessExest =true;
                                                            if (isBusinessExest&&!ssxwnlFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(ssxwnlRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        ssxwnlFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-丧失行为能力","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }
                                                            }
                                                            if (isBusinessExest&&!jbFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(jbRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        jbFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-疾病","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }
                                                            }

                                                            if (isBusinessExest&&!swFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(swRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        swFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-死亡","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }

                                                            }
                                                            if (isBusinessExest&&!szFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(szRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        szFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-失踪","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }

                                                            }

                                                            if (isBusinessExest&&!sxFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(sxRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        sxFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-涉嫌","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }

                                                            }


                                                            if (isBusinessExest&&!wgFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(wgRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        wgFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-违规","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }

                                                            }

                                                            if (isBusinessExest&&!wfFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(wfRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        wfFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-违法","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }

                                                            }

                                                            if (isBusinessExest&&!bzxFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(bzxRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        bzxFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-被执行","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }
                                                            }

                                                            if (isBusinessExest&&!sfFlag){
                                                                if (StringUtils.isNotEmpty(count)){
                                                                    pattern = Pattern.compile(sfRegex);
                                                                    matcher = pattern.matcher(count);
                                                                    if (matcher.matches()){
                                                                        List<ComponentResult.TextPosition> contentAndPositionList =new ArrayList<>();
                                                                        sfFlag = true;
                                                                        pageNum = pageModel.getPageNumber();
                                                                        contentAndPosition =  new ComponentResult().new TextPosition();
                                                                        contentAndPosition.setX(x);
                                                                        contentAndPosition.setY(y);
                                                                        contentAndPosition.setContent(count);
                                                                        contentAndPositionList.add(contentAndPosition);
                                                                        componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-司法","正确",false,getRegulationId(),pageNum,contentAndPositionList,"01");
                                                                        componentResults.add(componentResult);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                    if (isBusinessExest&& ssxwnlFlag && jbFlag && swFlag && szFlag &&sxFlag && wgFlag && wfFlag && bzxFlag && sfFlag){
                                                        break;
                                                    }
                                                }
                                            }
                                            if (isBusinessExest&& ssxwnlFlag && jbFlag && swFlag && szFlag &&sxFlag && wgFlag && wfFlag && bzxFlag && sfFlag){
                                                break;
                                            }
                                        }
                                    }
                                }
                                if (isBusinessExest&& ssxwnlFlag && jbFlag && swFlag && szFlag &&sxFlag && wgFlag && wfFlag && bzxFlag && sfFlag){
                                    break;
                                }
                            }
                            if (isBusinessExest&& ssxwnlFlag && jbFlag && swFlag && szFlag &&sxFlag && wgFlag && wfFlag && bzxFlag && sfFlag){
                                break;
                            }
                        }
                    }
                }
                if (isBusinessExest&& ssxwnlFlag && jbFlag && swFlag && szFlag &&sxFlag && wgFlag && wfFlag && bzxFlag && sfFlag){
                    break;
                }
            }
        }
        if (!ssxwnlFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-丧失行为能力","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }
        if (!jbFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-疾病","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }
        if (!swFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-死亡","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }
        if (!szFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-失踪","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }

        if (!sxFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-涉嫌","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }
        if (!wgFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-违规","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }
        if (!wfFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-违法","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }
        if (!bzxFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-被执行","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }
        if (!sfFlag){
            componentResult =  handingData.getComponentResult(catalogId,chapterId,ruleName,subTitle+"法人治理结构,关键词检查-司法","缺失",true,getRegulationId(),startPage,null,"02");
            componentResults.add(componentResult);
        }
        return  componentResults;
    }
}
